all: servidor cliente 

clean: 
	rm -rf run/*

cliente: src/cliente.c
	@echo Compilando cliente
	gcc -o run/cliente src/cliente.c

servidor: src/servidor.c
	mkdir run/tst
	@echo Compilando servidor
	gcc -o run/tst/servidor src/servidor.c

run: cf rs rc
rs: run/tst/servidor
	@echo Rodando sv
	cd run/tst/ && ./servidor 5432 256 &
rc: run/teste.sh
	@echo Rodando testes
	cd run && ./teste.sh
cf: 
	cp teste.sh run/.
	dd if=/dev/zero of=run/tst/1M bs=1024 count=100
	dd if=/dev/zero of=run/tst/4M bs=1024 count=400
	dd if=/dev/zero of=run/tst/50M bs=1024 count=5000
	

